#!/bin/bash

if [ "$1" = "server" ]; then
    jupyter notebook --allow-root
elif [ "$1" = "cmd" ]; then
    Rscript /root/rstudio/data/input/main.r
else
    echo "Usage: $0 [server|cmd]"
    echo "  server: Start RStudio Server"
    echo "  cmd: Keep container running (tail -f /dev/null)"
    exit 1
    tail -f /dev/null
fi